1. Field of the Invention
This invention relates to an image processing apparatus and an image processing method for generating a pseudo image on which change in the image pickup conditions is reflected, from a real image containing an image of an object, and a recording medium recording an image processing program.
2. Description of the Related Art
In related art, an image processing apparatus picks up an image of an object with an image pickup unit, such as a camera, and detects the object from the real image containing the image of the object. For example, an image processing apparatus is used to detect the position of an object, such as a position detection mark of a product, which is transported on a belt conveyor in a production line of a factory, and execute later steps using the detected position.
In the case of using an image processing apparatus in the factory as mentioned above, for example, the brightness in the factory changes due to the variation of weather conditions, time of day, illumination, and the like, thereby changing the image pickup conditions of the object. Thus, in the image processing apparatus of the related art, by operating the image processing apparatus, after actually changing the image pickup conditions, it can be determined whether or not the operation condition of the image processing apparatus, after the change in the image pickup conditions, is normal.
Some image processing apparatus generate a pseudo image from the real image of the object by changing the brightness, the object position, etc., with simulation, detect the object using the generated pseudo image, and then display the detection result such as a normal value or an abnormal value, impossible detection, or the like. In this case, the user can see the detection result, thereby making an estimation as to whether or not the operation condition of the image processing apparatus after change in the simulated image pickup conditions is normal.
However, to actually change the image pickup conditions and determine whether or not the operation condition of the image processing apparatus is normal, as described above, it requires a long time to set the image pickup conditions, etc. Thus the detection accuracy of the image processing apparatus, after change in the image pickup conditions cannot be determined in a short time. Particularly, once the image processing apparatus is installed in a manufacturing line, to determine whether or not the operation condition of the image processing apparatus is normal, the manufacturing line needs to be stopped, and thus a sufficient time cannot be taken for examining the detection accuracy of the image processing apparatus.
Even the image processing apparatus, which simulates change in the image pickup conditions such as brightness, is intended for making an estimation as to whether or not the operation condition of the image processing apparatus is normal. Thus the range of the image pickup conditions, in which the normal operation can be performed, is simply known and the detection accuracy of the object after change in the image pickup conditions cannot be quantitatively measured.
It is therefore an object of the invention to provide an image processing apparatus, an image processing method, and a recording medium that contains an image processing program, which makes it possible to measure quantitatively the detection accuracy of an object in response to an assumed image pickup condition change in a short time, without actually changing the image pickup conditions.
(1) First Embodiment of the Invention
According to a first embodiment of the invention, there is provided an image processing apparatus for generating a pseudo image (second image) on which change in image pickup conditions is reflected from a real image or real picked-up image (first image) containing an image of an object. The image processing apparatus comprises a capture section for capturing the real picked-up image, and a calculation section for processing the real picked-up image captured by the capture section to generate a pseudo image on which change in the image pickup conditions is reflected, detecting the image of the object contained in the pseudo image using a predetermined image processing parameter, while moving the pseudo image in order relative to the real picked-up image, and calculating a detection error of the image of the object contained in the pseudo image relative to a move distance of the pseudo image, as a pseudo image detection error.
In the image processing apparatus according to the invention, the real picked-up image is captured, a pseudo image on which change in the image pickup conditions is reflected is generated by processing the captured real picked-up image, the image of the object contained in the pseudo image is detected using the predetermined image processing parameter, while the pseudo image is moved in order relative to the real picked-up image, and a detection error of the image of the object contained in the pseudo image relative to the move distance of the pseudo image is calculated, as a pseudo image detection error.
The pseudo image on which change in the image pickup conditions relative to the real image is reflected is thus used to calculate a detection error of the image of the object, so that the detection accuracy of the object in response to an assumed image pickup condition change can be calculated in a short time, without actually changing the image pickup conditions. Since a detection error of the image of the object relative to the move distance of the pseudo image is calculated, the detection accuracy of the object in response to the assumed image pickup condition change can be measured quantitatively. Consequently, the detection accuracy of the object in response to the assumed image pickup condition change can be measured quantitatively in a short time without actually changing the image pickup conditions.
(2) Second Embodiment of the Invention
In an image processing apparatus according to a second embodiment of the invention, in the configuration of the image processing apparatus according to the first aspect of the invention, the calculation section comprises a generation section for processing the real picked-up image, captured by the capture section, to generate a pseudo image on which change in an image pickup conditions is reflected, and a first error calculation section for detecting the image of the object contained in the pseudo image using a predetermined image processing parameter at each move position, while moving the pseudo image, and calculating a detection error of the image of the object contained in the pseudo image relative to the move distance of the pseudo image, as a pseudo image detection error (second image detection error).
In this case, the captured real picked-up image is processed to generate a pseudo image on which change in the image pickup conditions is reflected. The image of the object contained in the pseudo image is detected using a predetermined image processing parameter at each move position, while the position of the generated pseudo image is moved in order, and a detection error of the image of the object contained in the pseudo image, relative to the move distance of the pseudo image is calculated, as the pseudo image detection error. Thus, the pseudo image detection error can be calculated in a short time and quantitatively.
(3) Third Embodiment of the Invention
In an image processing apparatus according to a third embodiment of the invention, the image processing apparatus further comprises a second error calculation section for using the real picked-up image captured by the capture section or an image generated by copying the real picked-up image as a reference image (third image), detecting the image of the object contained in the reference image using the predetermined image processing parameter at each move position while moving the reference image relative to the real picked-up image, and calculating a detection error of the image of the object contained in the reference image, relative to the move distance of the reference image as the reference image detection error (third image detection error).
In this case, the real picked-up image or the image generated by copying the real picked-up image is used as a reference image, the image of the object contained in the reference image is detected using the predetermined image processing parameter at each move position, while the position of the reference image is moved, and a detection error of the image of the object contained in the reference image relative to the move distance of the reference image is calculated, as the reference image detection error. Therefore, the detection error of the image of the object in conditions in which the image pickup conditions do not change can be calculated, so that the difference between the reference image detection error and the pseudo image detection error is calculated, whereby only the detection error caused by change in the image pickup conditions can be extracted, and the speed of the image processing apparatus relative to change in the image pickup conditions can be measured quantitatively and in a short time.
(4) Fourth Embodiment of the Invention
In an image processing apparatus according to a fourth embodiment of the invention, the image processing apparatus further comprises a change section, for varying the image processing parameter used in the first and second calculation sections, based on the pseudo image detection error and the reference image detection error.
In this case, the image processing parameter is changed based on the pseudo image detection error and the reference image detection error, so that the image processing parameter can be changed automatically to an optimum value after change in the image pickup conditions, and an image processing apparatus having a fast response to change in the image pickup conditions can be provided easily.
(5) Fifth Embodiment of the Invention
According to a fifth aspect of the invention, there is provided an image processing method for generating a pseudo image, on which change in image pickup conditions is reflected from a real picked-up image containing an image of an object. The image processing method comprises capturing the real picked-up image, processing the captured real picked-up image to generate a pseudo image, on which change in the image pickup conditions is reflected, detecting the image of the object contained in the pseudo image using a predetermined image processing parameter, while moving the pseudo image relative to the real picked-up image, and calculating a detection error of the image of the object contained in the pseudo image relative to the move distance of the pseudo image, as a pseudo image detection error.
In the image processing method according to the invention, the real image is captured, a pseudo image on which change in the image pickup conditions is reflected is generated by processing the captured real picked-up image, the image of the object contained in the pseudo image is detected, using the predetermined image processing parameter, while the pseudo image is moved relative to the real picked-up image, and a detection error of the image of the object contained in the pseudo image relative to the move distance of the pseudo image is calculated as a pseudo image detection error.
The pseudo image on which change in the image pickup conditions is reflected relative to the real picked-up image is thus used to calculate a detection error of the image of the object, so that the detection accuracy of the object in response to the assumed image pickup condition change can be calculated in a short time without actually changing the image pickup conditions. Since a detection error of the image of the object, relative to the move distance of the pseudo image is calculated, the detection accuracy of the object in response to the assumed image pickup condition change can be measured accurately. Consequently, the detection accuracy of the object, in response to the assumed image pickup condition change can be measured quantitatively in a short time without actually changing the image pickup conditions.
(6) Sixth Embodiment of the Invention
According to the sixth embodiment of the invention, there is provided a computer-readable recording medium, having recorded thereon, an image processing program for performing the image processing to generate a pseudo image, on which change in image pickup conditions is reflected from a real picked-up image containing an image of an object. The image processing program causes or directs a computer to perform the following steps: capturing the real picked-up image, processing the captured real picked-up image to generate a pseudo image on which change in the image pickup conditions is reflected, detecting the image of the object contained in the pseudo image using a predetermined image processing parameter, while moving the pseudo image relative to the real picked-up image and calculating a detection error of the image of the object contained in the pseudo image, relative to the move distance of the pseudo image, as a pseudo image detection error.
According to the image processing program of the invention, the real picked-up image is captured, a pseudo image is generated by processing the real picked-up image, the image of the object contained in the pseudo image is detected using the predetermined image processing parameter, while the pseudo image is moved relative to the real picked-up image, and a detection error of the image of the object contained in the pseudo image, relative to the move distance of the pseudo image, is calculated as a pseudo image detection error.
The pseudo image on which change in the image pickup conditions is reflected relative to the real picked-up image is thus used to calculate a detection error of the image of the object, so that the detection accuracy of the object in response to the assumed image pickup condition change can be calculated in a short time without actually changing the image pickup conditions. Since a detection error of the image of the object relative to the move distance of the pseudo image is calculated, the detection accuracy of the object in response to the assumed image pickup condition change can be measured accurately. Consequently, the detection accuracy of the object in response to the assumed image pickup condition change can be measured quantitatively in a short time without actually changing the image pickup conditions.